<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>LiWE: OS3 JS Lib / Object Enhancements</title>
<link rel="stylesheet" href="docs.css" type="text/css" />
<script type="text/javascript" language="javascript" src="docs.js"></script>
</head>
<body onload="prepare_leftbar();">

<div id="title">
LiWE: <a href="index.html">OS3 JS Lib</a> / Object Enhancements
</div>

<div id="leftbar">
</div>

<div id="main">
	<!-- {{{ Introduction -->
	<div class="block">
		<a name="form_intro" title="Introduction"/>
		<div class="title">
			Introduction
		</div>

		<div class="text">
			laskd adj alk jdlak jdlka jdkla jdkl ajkdl jakld jlka jdlka jdlka jdkla jdlk ajkld jalk djla dla djklajsdklajsdklajsd lkasjd
			kasdj sakdj aksd jkas djka jdka jdka jdka jdka jdk ajkd jaksd jaks djkasdj kadj kasjdkajdkajdkasjdka djka jdkajd
			adoaidoa dioaidoa doa idoa idoai lad lakj dlkajd laskj dlaskjd lkasjd lksaj dlkas jdlkajsd
			aosdia sod asodi asod akljd jkash duqd jqkdh qkjdhusdh akjsdajkshduasd hkajsdhsajkdh uas dkashdjakshdua hkjahd jsadh uas
		</div>
	</div>
	<!-- }}} -->
	<!-- {{{ get ( key, def_val ) -->
	<div class="block">
		<a name="object_get" title="Object::get()"/>
		<div class="title">
			Object::get ()
		</div>

		<div class="text">
			<table class="function">
				<tr>
					<td class="name" valign="top">Name:</td>
					<td class="tt">get()</td>
				</tr>
				<tr>
					<td class="name" valign="top">Synopsis:</td>
					<td class="tt">Mixed get ( key [, def_val ] )</td>
				</tr>

				<tr>
					<td class="name" valign="top">Description:</td>
					<td class="descr">
						This method returns the value of the attribute <tt>key</tt>. If <tt>key</tt> is not found, then
						<tt>def_val</tt> is returned instead. Since <tt>def_val</tt> is an optional value, if not provided,
						then <tt>undefined</tt> is returned.
					</td>
				</tr>

				<tr>
					<td class="name" valign="top">Input:</td>
					<td class="descr">
						<ul>
							<li><tt>key</tt> - (<tt>String</tt>) The key to look for inside the Object.</li>
							<li><tt>def_val</tt> - (<tt>Mixed</tt>) [<strong>Optional</strong>]  The default value to be returned if the given <tt>key</tt>
								is not present inside the <tt>Object</tt>.
							</li>
						</ul>
					</td>
				</tr>

				<tr>
					<td class="name" valign="top">Returns:</td>
					<td class="descr">
						The value of <tt>key</tt> or <tt>def_val</tt> if <tt>key</tt> has not been found.
					</td>
				</tr>
				<tr>
					<td class="name" valign="top">See Also:</td>
					<td class="descr">
						<ul>
							<li><a href="array_enh.html#array_find">Array::find</a></li>
						</ul>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<!-- }}} -->
	<!-- {{{ getName () -->
	<div class="block">
		<a name="object_getName" title="Object::getName()"/>
		<div class="title">
			Object::getName ()
		</div>

		<div class="text">
			<table class="function">
				<tr>
					<td class="name" valign="top">Name:</td>
					<td class="tt">getName()</td>
				</tr>
				<tr>
					<td class="name" valign="top">Synopsis:</td>
					<td class="tt">String getName ()</td>
				</tr>

				<tr>
					<td class="name" valign="top">Description:</td>
					<td class="descr">
						Returns the <em>function name</em>.
						<div class="note">This method works only inside a function. </div>
					</td>
				</tr>

				<tr>
					<td class="name" valign="top">Input:</td>
					<td class="descr">
						NONE
					</td>
				</tr>

				<tr>
					<td class="name" valign="top">Returns:</td>
					<td class="descr">
						A <tt>String</tt> containing the function name.
					</td>
				</tr>
			</table>
		</div>
	</div>
	<!-- }}} -->
	<!-- {{{ inherits ( cback ) -->
	<div class="block">
		<a name="object_inherits" title="Object::inherits()"/>
		<div class="title">
			Object::inherits ()
		</div>

		<div class="text">
			<table class="function">
				<tr>
					<td class="name" valign="top">Name:</td>
					<td class="tt">inherits()</td>
				</tr>
				<tr>
					<td class="name" valign="top">Synopsis:</td>
					<td class="tt">void inherits ( parent_object )</td>
				</tr>

				<tr>
					<td class="name" valign="top">Description:</td>
					<td class="descr">
						This method extends the current <tt>Object</tt> with the functions and attributes of <tt>parent_object</tt>.
						A new <tt>parent</tt> attribute is set to the current <tt>Object</tt> that directly references the <tt>parent_object</tt>.
					</td>
				</tr>

				<tr>
					<td class="name" valign="top">Input:</td>
					<td class="descr">
						<ul>
							<li><tt>parent_object</tt> - (<tt>Object</tt>) The parent <tt>Object</tt> to inherit from.</li>
						</ul>
					</td>
				</tr>

				<tr>
					<td class="name" valign="top">Returns:</td>
					<td class="descr">
						Nothing.
					</td>
				</tr>
			</table>
		</div>
	</div>
	<!-- }}} -->
	<!-- {{{ iterate ( cback ) -->
	<div class="block">
		<a name="object_iterate" title="Object::iterate()"/>
		<div class="title">
			Object::iterate ()
		</div>

		<div class="text">
			<table class="function">
				<tr>
					<td class="name" valign="top">Name:</td>
					<td class="tt">iterate()</td>
				</tr>
				<tr>
					<td class="name" valign="top">Synopsis:</td>
					<td class="tt">void iterate ( cback )</td>
				</tr>

				<tr>
					<td class="name" valign="top">Description:</td>
					<td class="descr">
						For every item of the <tt>Object</tt>, calls the function <tt>cback</tt> passing two parameters:
						the first one is the item <strong>value</strong> and the second one is the item <strong>key name</strong>.
						The function prototype fro the <tt>cback</tt> function is the following:<br />
						<tt>function cback ( value, key ) { ... }</tt>
					</td>
				</tr>

				<tr>
					<td class="name" valign="top">Input:</td>
					<td class="descr">
						<ul>
							<li><tt>cback</tt> - (<tt>Function</tt>) The function to be called for every item.</li>
						</ul>
					</td>
				</tr>

				<tr>
					<td class="name" valign="top">Returns:</td>
					<td class="descr">
						Nothing.
					</td>
				</tr>
			</table>
		</div>
	</div>
	<!-- }}} -->
	<!-- {{{ debugDump ( [ dump_funcs [, lvl ] ] ) -->
	<div class="block">
		<a name="object_debugDump" title="Object::debugDump()"/>
		<div class="title">
			Object::debugDump ()
		</div>

		<div class="text">
			<table class="function">
				<tr>
					<td class="name" valign="top">Name:</td>
					<td class="tt">debugDump()</td>
				</tr>
				<tr>
					<td class="name" valign="top">Synopsis:</td>
					<td class="tt">String debugDump ( [ dump_funcs [, lvl ] ] )</td>
				</tr>

				<tr>
					<td class="name" valign="top">Description:</td>
					<td class="descr">
						Creates a <tt>String</tt> rappresentation of the <tt>Object</tt>. If <tt>dump_funcs</tt> is set to <tt>true</tt>,
						functions are dumped as well.
					</td>
				</tr>

				<tr>
					<td class="name" valign="top">Input:</td>
					<td class="descr">
						<ul>
							<li><tt>dump_funcs</tt> - (<tt>boolean</tt>) [<strong>Optional</strong>] If set to <tt>true</tt> functions are dumped in the rappresentation.</li>
							<li><tt>lvl</tt> - INTERNAL USE ONLY, DO NOT PASS.</li>
						</ul>
					</td>
				</tr>

				<tr>
					<td class="name" valign="top">Returns:</td>
					<td class="descr">
						A <tt>String</tt> rappresenting the current <tt>Object</tt>.
					</td>
				</tr>
				<tr>
					<td class="name" valign="top">See Also:</td>
					<td class="descr">
						<ul>
							<li><a href="array_enh.html#array_toSourceString">Array::toSourceString</a></li>
						</ul>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<!-- }}} -->
</div>


</body>
</html>
